<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:71:"D:\phpStudy\WWW\ferr\public/../application/manage\view\login\index.html";i:1492392708;}*/ ?>
<!DOCTYPE html>
<html>
<head>
	<title>登录</title>
	<link rel="stylesheet" type="text/css" href="__CSS__/reset.css">
	<link rel="stylesheet" type="text/css" href="__CSS__/login/login.css">
	<script type="text/javascript" src="__JS__/jquery.js"></script>
</head>
<body>
	<div id="login_bg">
		<div class="login_b_box">
			<div class="login_box">
				<div class="title">
					<span>网站后台管理系统</span>
				</div>
				<div class="content">
					<div class="user_box inp_box">
						<label for="user">用户名:</label>
						<input type="text" name="user" id="user" placeholder="请输入用户名">
						<i class="user_img"></i>
						<p class="userMsg"></p>
					</div>
					
					<div class="pass_box inp_box">
						<label for="pass">密码:</label>
						<input type="password" name="pass" id="pass" placeholder="请输入密码">
						<i class="pass_img"></i>
						<p class="pwdMsg"></p>
					</div>
					
					<div class="btn_box">
						<button id="login_btn">登录</button>
					</div>
				</div>
				<div style="width:100%;height:1px;"></div>
			</div>
			<div class="login_inv"></div>
		</div>
	</div>
	<script type="text/javascript">
		$("#login_btn").click(function(){
			var tel = $("#user").val();
			var pwd = $("#pass").val();
			if(!tel||!pwd){
				$(".pwdMsg").html("用户名或密码不能为空！");
				return;
			}
			$.post("<?php echo url('manage/Login/Login'); ?>",{tel:tel,pwd:pwd},function(data){
				var data = JSON.parse(data);
				console.log(data);
				if(data.status){
					window.location.href="<?php echo url('manage/User/index'); ?>";
				}else{
					$(".pwdMsg").html(data.message);
				}
			})
		})
	</script>
</body>
</html>